package com.suneee.store.service;

import java.util.List;
import java.util.Map;

import com.suneee.context.page.Page;
import com.suneee.store.bean.CompareRecordBean;
import com.suneee.store.bean.ShopStockBean;
import com.suneee.store.bean.SyncTmallResultBean;
import com.suneee.store.bean.ViewShopStockDTO;
import com.suneee.store.bean.ViewShopStockRecordsDTO;
import com.suneee.store.bean.ViewStockRecordDTO;
import com.suneee.store.entity.ViewCompareRecordDetail;
import com.suneee.store.entity.ViewShopStockRecords;
import com.suneee.store.entity.ViewStockRecord;
import com.suneee.store.extend.ComparePage;
import com.suneee.web.bean.DownloadInfo;

public interface ShopStockService {
	/**
	 * 店铺仓库（列表）
	 * @param dto
	 * @return
	 */
	public Page<Map<String,Object>> getShopStockRecords(ViewShopStockRecordsDTO dto);
	
	/**
	 * 调减店铺库存
	 * @param dtoList
	 */
	public List<SyncTmallResultBean> decreaseShopStocks(List<ViewShopStockRecordsDTO> dtoList,Integer operateStoreId,String remark,String stockType);
	
	/**
	 * 同步更新价格
	 * @param dtoList
	 * @param remark
	 */
	public List<SyncTmallResultBean> updatePrice(List<ViewShopStockRecordsDTO> dtoList,String remark);
	
	/**
	 * 待比对列表
	 * @param dto
	 * @return
	 */
	public Page<ViewShopStockRecords> compareList(ViewShopStockRecordsDTO dto);
	
	/**
	 * 商品比对
	 * @param dtoList
	 */
	public List<SyncTmallResultBean> updateWaitingMatchSkus(List<ViewStockRecord> list) throws Exception;
	
	/**
	 * 商品回退
	 * @param dtoList
	 * @param remark
	 */
	public void feedback(List<ViewShopStockRecordsDTO> dtoList, String remark);
	
	/**
	 * 导出比对记录
	 * @param recordId 出入仓单号
	 * @param flag 待比对、比对失败标志
	 * @return
	 */
	public DownloadInfo exportWaitingMatchSkus(List<ViewStockRecordDTO> params);
	
	/**
	 * 获得商品的出库详细
	 * @param skuId
	 * @return
	 */
	public List<ShopStockBean> getListBySkuId(Integer skuId);
	
	/**
	 * 获取已入库店铺库存
	 * @param dto
	 * @return
	 */
	public Page<Map<String, Object>> getShopStocks(ViewShopStockDTO dto);
	
	/**
	 * 获得比对商品列表
	 * @return
	 */
	public List<ComparePage<ViewCompareRecordDetail>> getCompareList();
	
	/**
	 * 获得单个出库单号的比对翻页
	 * @param dto
	 * @return
	 */
	public ComparePage<ViewCompareRecordDetail> getComparePage(ViewStockRecordDTO dto);
	
	/**
	 * 获得比对商品列表
	 * @return
	 */
	public List<CompareRecordBean> getCompareRecordList();
	
	/**
	 * 获得比对商品分页
	 * @return
	 */
	public Page<CompareRecordBean> getCompareRecordPage(ViewStockRecordDTO dto);
}
